﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class CMS_Control_NoticeBlock : System.Web.UI.UserControl
{
    Usas.BLL.Cms.cms_block_common_detail cbcd = new Usas.BLL.Cms.cms_block_common_detail();
    Usas.Model.Cms.cms_block_common_detail cbcdm = new Usas.Model.Cms.cms_block_common_detail();
    Usas.BLL.Cms.cms_block cb = new Usas.BLL.Cms.cms_block();
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = cb.GetList("b_path='NoticeBlock.ascx'").Tables[0].Rows[0]["b_id"].ToString();
        string type = System.IO.Path.GetFileName(HttpContext.Current.Request.Path);

        DataSet ds = cbcd.GetList("c_b_id=" + id + " and c_type='" + type + "'");

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            string value = ds.Tables[0].Rows[0]["c_value"].ToString().Trim().Replace("\r", "<br/>");
            Notice.InnerHtml = "<div id='Noticefont'>" + value + "</div>";
     
        }

    }
}
